#!/usr/bin/env bash

curl -X POST -H "Content-Type:application/x-zc-object" -H "x-zc-major-domain-id:9" -H "x-zc-sub-domain-id:25" -H "X-Zc-Timeout:9999999" -H "x-zc-developer-id:333" \
-d '{"cbcEnable":false,"wifiId":"865001100040001000100000100000000008"}' \
"http://localhost:5814/zc-julink-warehouse/v1/getCipheredDKey"

curl -X POST -H "Content-Type:application/json" \
-d '{"wifiId": "5fad31c3316744b3a03b84af19632823", "cbcEnable": false, "payload": "ddd"}' \
"http://localhost:5814/zc-warehouse/v1/cipherWithDKey"


curl -X POST -H "Content-Type:application/json" \
-d '{"subDomain": "24", "deviceId": "8650011000100010001000000244db09b200", "publicKey": "8e4b2f6f5fc5e764c38aba5f57a1fd04", "batchCode": "edwin1987"}' \
"http://localhost:5814/test/createOne"

curl -X POST -H "Content-Type:application/json" \
-d '8650011000100010001000000244db09b200' \
"http://localhost:5814/test/retriveByWifiId"

curl -X POST -H "Content-Type:application/x-zc-object" \
-d '{"wifiId":"86505510007000400560000012e99fc52d80"}' \
"http://localhost:5814/zc-warehouse/v1/authBatch"


curl -X POST -H "Content-Type:application/x-zc-object" -H "x-zc-major-domain-id:16" -H "x-zc-sub-domain-id:218" -H "X-Zc-Timeout:9999999" -H "x-zc-developer-id:333" \
-d '{"domain": "16", "subDomain": "218", "devices": [{"deviceId": "86505510007000400560000012e99fc52c07", "publicKey": "4f82792708717abacc7678c5e4cb3a37","batchCode":"edwin198704"},{"deviceId": "86505510007000400560000012e99fc52c08", "publicKey": "cbdacfb9044058319529929d9010917d","batchCode":"edwin198704"}]}' \
"http://localhost:5814/zc-warehouse/v1/registerDevices"

curl -X POST -H "Content-Type:application/json" \
-d '333' \
"http://localhost:5814/test1/select"

curl -X POST -H "Content-Type:application/x-zc-object" -H "x-zc-major-domain-id:16" -H "x-zc-sub-domain-id:25" -H "X-Zc-Timeout:9999999" -H "x-zc-developer-id:333" \
-d '{"domainId":"43"}' \
"http://localhost:5814/zc-warehouse/v1/createSqlTable"


curl -X POST -H "Content-Type:application/x-zc-object" -H "x-zc-major-domain-id:16" -H "x-zc-sub-domain-id:25" -H "X-Zc-Timeout:9999999" -H "x-zc-developer-id:333" \
-d '{"physicalDeviceId": "8650011000100010001000000244db09aaaa"}' \
"http://localhost:5814/zc-warehouse/v1/getPublicKey"


curl -X POST -H "Content-Type:application/json" \
-d '{"majorDomainId": "11", "subDomainId" : "2"}' \
"http://localhost:5814/basic-data/getInfoTotal"


curl -X POST -H "Content-Type:application/json" \
-d '{"majorDomainId": "11", "subDomainId" : "2"}' \
"http://localhost:5814/basic-data/getDeviceBySubDomain"

curl -X POST -H "Content-Type:application/json" \
-d 'zzzz' \
"http://localhost:5814/zc-warehouse/v1/test"
